Graphics controller for forming a composite image

ABSTRACT

A graphics controller produces a composite image through selecting between input image pixels, which are designated to be displayed in the same pixel location, by using a select function. The select function is computed on a pixel by pixel basis to provide a select signal that indicates which pixel should be chosen for display as the final composite image on the display screen. The select signal uses mixing key functions to determine which pixel should be passed. The results of these functions are output in the form of key codes. Key codes are combined by performing a logical AND operation between the key codes, and with a Raster OPeration (ROP) code. The ROP code designates which key code combinations are to be logically ORed together to provide an increased number of possible key combinations to determine the selection of the image to be displayed.

FIELD OF THE INVENTION

The present invention relates generally to graphics controllers, andmore particularly to a graphics controller for graphical user interfacesthat combines multiple images into a single composite image.

BACKGROUND OF THE INVENTION

The output devices of computers often include bitmap graphics devices. Abitmap graphics device typically includes a graphics adapter, which hasa display memory, and a display screen. The bitmap graphics deviceinputs a bitmap to be displayed and then displays that bitmap on thedisplay screen. A bitmap is a matrix of bits that defines an image thatis to be displayed in a rectangular area on a display screen. Each bitin a bitmap corresponds to one picture element (pixel) on the displayscreen. To display computer output data, a bitmap graphics device readsthe bitmap stored in the display memory and renders the correspondingimage on the display screen. If a bit in the display memory is 1 thenthe bitmap graphics device turns on the corresponding, pixel on thedisplay screen. If a bit in the display memory is 0, then the bitmapgraphics device turns off the corresponding pixel on the display screen.By changing the contents of the display memory for instance, by loadinga new bitmap, a computer program can effect a change on the displayscreen.

A computer program typically generates a bitmap in program memory, andthen copies the bitmap to the display memory. Copying from programmemory to display memory can be relatively time-consuming becausebitmaps are often quite large and can contain one million or more bits.To improve performance and facilitate computer programming typicalgraphically-oriented operating systems provide routines that areoptimized to copy bitmaps from program memory to display memory. Theseroutines are known as bit block-transfer (bitBLT) routines.

In general, these bitBLT routines can read as input a source bitmap anda destination bitmap. which is typically in display memory. These bitBLTroutines copy the source bitmap to the destination bitmap in anefficient manner because bitBLT routines are optimized to copy acomputer word of data at a time, rather than just a single bit at atime. A computer word is a number of bits that the computer operates onas a unit which typically comprise 8, 16 or 32 bits.

In conventional graphical user interfaces, it is necessary for agraphics controller to combine these different bitBLT images so that acomposite image can be produced for display on a display screen which istypically a cathode ray tube (CRT) or computer monitor. Simple examplesof composite images are a cursor appearing, on top of the backgrounddisplay, or text being displayed on top of a motion video image.Similarly, a Windows™-based application displays composite images whenrunning multiple windows concurrently. Multimedia display systems alsoproduce composite images when overlaying real time video amongst othermultimedia display images. All of these examples require complexprocessing because numerous comparisons must be evaluated with eachrefresh cycle to determine how to display the resultant composite imageproperly.

Conventional graphics controllers frequently hard code these imagecomposition features into their processors. Therefore, these featureswork in a very limited number of ways, many times with the onlyprogrammability provided being the ability to turn a specific feature onor off. This hard coding approach does not offer much flexibility, andso problems arise when the mixing of images is sought to be accomplisheddifferently than originally hard coded.

SUMMARY OF THE INVENTION

A need exists for flexibly forming composite image data in a manner thatallows the processing of data to be altered depending on the desiredresult to be achieved. In particular, instead of implementing onlyspecific image composition features in the way conventional systems do,the need exists for a design that allows virtually any combination ofvideo composition features to be realized.

In accordance with the present invention a graphics controller isprovided which produces a composite image through selecting betweeninput image pixels, that are designated to be displayed in the samepixel location, by using a select function. The select function iscomputed on a pixel by pixel basis to provide a select signal whichindicates which pixel should be chosen for display as the finalcomposite image on the display screen. For example, the graphicscontroller uses the select function to select and send a color code of acursor image, whose pixel location is designated as the same as that ofa background image, to the appropriate pixel position on the displayscreen based on the select signal.

The select signal is generated in response to mixing keys which arefunctions for determining which image's pixel should be passed. Theresults are output in the form of key codes. In certain embodiments, thekey codes are combined by performing a logical AND operation betweeneach of the key codes, and with a Raster OPeration (ROP) code.

A mixing key may perform a comparison between two values, for example,and output a key code to indicate the result of the comparison, such ascomparing if one value is greater than the other value. As an example ofa comparison, a register value representing the color of a "backgroundpixel" can be compared with a register value representing the color of a"graphics pixel" to determine if the values are equal. If this exemplarycomparison results in a match in values, the mixing key outputs a keycode value of 1 to indicate the values were equal, whereas if there isnot a match, the key code has an output value of 0 to indicate thevalues did not equal each other, enabling selection of the "backgroundpixel" or the "graphics pixel".

In addition to the mixing key example mentioned in the precedingparagraph, other mixing keys, specifying the results of other functionssuch as altering a pixel's value and comparing the altered pixel to anadjacent pixel value, are also taken into consideration by the selectfunction. The select function combines the results of these mixing keysto form key code combinations. In certain embodiments of the presentinvention, the key codes of each combination are logically ANDedtogether to select an output pixel from a selected one of a plurality ofinput images. When the results of this logical operation equals 1, thepixel from a first image is passed, and when 0, a pixel from a secondimage is passed. Since there are multiple mixing keys, there are manypossible key code combinations.

In order to provide much greater flexibility, the select function can bedefined so that multiple combinations of key codes can be simultaneouslyconsidered. This selecting of key code combinations is achieved throughthe use of the ROP code which is a string of binary digits stored in aplurality of single bit registers according to embodiments of thepresent invention. The ROP code controls the selection of which key codecombinations are computed by the selection function. These ROP coderegisters can hold a value of 1 or 0. Each ROP code register isassociated with one key code combination. When the key codes of acombination are logically ANDed together, the ROP code register value isANDed with that combination as well. In effect, the ROP code register isa flag or indicator that essentially performs a logical OR operationbetween key code combinations.

Thus, the select function equals 1 when any of the various key codecombinations which have been flagged with a 1 in the ROP registerreturns a value of 1 after ANDing the key codes within the combination.When the select function equals 1, the select signal generator sends aselect signal to a MUX so that the appropriate input pixel is passed foroutput.

The use of the ROP code determines how the select function uses themixing key comparisons to offer much greater flexibility overtraditional methods for generating the select function. The traditionalmethod of defining a select function using only a hard wired set ofmixing keys limited the number of select functions to 2^(n). Forexample, if there are four mixing keys, the prior art only allowedsixteen different ways of combing the mixing keys. By applying ROP codesto combine the key codes, a vastly greater number of possible functionalcombination is achieved. This provides for much greater programmingflexibility than known methods because multiple key code combinationscan be considered simultaneously.

Other features and advantages of the invention will be set forth in, orapparent from, the description of the preferred embodiments below.

BRIEF DESCRIPTIONS OF THE DRAWINGS

FIG. 1 is a schematic block diagram of a first embodiment of thegraphics controller of the present invention;

FIG. 2 is a diagram of an exemplary embodiment of a select function usedin accordance with the graphics controller of the present invention; and

FIG. 3 is a schematic block diagram of a second embodiment of thegraphics controller of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates a graphics controller 10 that utilizes RasterOperation (ROP) codes to increase the flexibility in generating a selectfunction which performs pixel selection. In general, the selectionbetween input pixels from a pair of images is well known. As describedbelow, the graphics controller 10 generates a select function based onsimultaneous consideration of multiple key combinations to providegreater programming flexibility.

In FIG. 1, the graphics controller 10 is shown as comprising amultiplexer (MUX) 20 that receives a pair of input image signals 22 and24 from a pair of pixels 22a and 24a from respective images stored inframe buffer 26. MUX 20 selects between input image signals 22, 24 andsends an output signal 28 to a display screen 30. The input signals 22,24 have information pertaining to the location and color of input imagesthat are to be mixed for display in the form of a final composite image.Display screen 30, which displays the composite image, can be anyconventional display device such as a computer monitor, a cathode raytube (CRT), an LCD display, etc. Display screen 30 has a plurality ofpicture elements (pixels) 32, each having a discrete location on displayscreen 30. Only one such pixel 32 is shown in the figures forconvenience.

In addition to receiving input signals 22 and 24, MUX 20 also receives aselect signal 38 from a select circuit 40. Select signal 38 provides MUX20 with an indication as to which of the input signals 22 or 24 to passas output signal 28. Select circuit 40 comprises select signal generator50 that generates and outputs select signal 38 to MUX 20 based onsupplied mixing keys from a mixing key function generator 52. Mixing keyfunction generator 52 executes stored functions, on a pixel by pixelbasis. The mixing keys may be based on any data such as a pixel value,the comparison of a pixel value with another value (e.g. another pixelor register value), the result of combining multiple pixels, a staticregister value, or virtually any information that is available to asystem to which graphics controller 10 is connected. A bus 54 isconnected to mixing key function generator 52 to carry this data orinformation from the data sources to the mixing key function generator52. These data sources may include a plurality of image data sources 56,a register value 58, or other information in the form of data 60 (e.g.,a clock signal or address information).

Mixing key function generator 52 obtains the requisite data orinformation from bus 54 to perform the various functions which aredefined according to any comparison of values. Complete flexibility isavailable in defining functions. Any value can be processed according toa function. The outcome of the function is compared with a predefined todetermine if the outcome is acceptable or not. Examples of thesefunctions can be comparing two pixel color values or determining if apixel value is within a specific color range. These functions are knownas mixing keys. The functional result of a mixing key, may be forexample, whether a color value falls within a specific range of values.Depending on the results of the data as operated on by the function, theresultant value has an output value of 1 or a 0 which is produced by themixing key function generator as an individual key code 62.

An example of a common mixing key used in multimedia applications is the"color key". The color key generates a single bit result (e.g., key code62a), for example of the comparison of a register value, such as that ofregister 58, with a pixel value such as that contained in 56. The commonapplication of the color key is to compare a register value representinga "background color" at a particular pixel with a value of a "graphicspixel value" at that same pixel. In this case, if this comparisonresults in a match, a signal value of 1 may be assigned to the key code62 which is output for that mixing key, whereas if there is no match thekey code 62 is assigned a signal value of 0.

In addition to the color key/mixing key example mentioned above, othermixing keys 62, specifying the results of other comparisons, are alsotaken into consideration in the select signal generator 50. As discussedearlier, the mixing keys may represent numerous different types ofinformation as is well known in the art. This includes a pixel value, acomparison of a pixel value, the result of combining multiple pixels, astatic register value, etc.

The key codes 62a-d generated by the mixing key are single bit valuesspecifying an acceptable outcome having a value of 1 or an unacceptableoutcome having a value 0 that are logically combined using an ANDoperation to form a select signal that is either true (1) or false (0).In the prior art, this combining was normally limited to 2^(n) differentcombinations.

FIG. 2 is a diagram illustrating a select function 80 programmed inVERILOG™, used by the select signal generator 50 to generate a selectsignal. The select signal generator 50 uses the select function 80 togenerate select signal 38 used by MUX 20 to identify which input pixel22 or 24 should be passed through MUX 20 and output as output signal 28.The output value of the select function 80 depends on the values of theindividual key codes 62 input to the select signal generator 50.

In the embodiment of FIG. 2, select function 80 has multiple columns ofmixing keys 82. Each mixing key 82 represents a key code 62 which isshown in FIG. 2 as one of Key 3, Key 2, Key 1, or Key 0. In theexemplary embodiment, the key code is a binary result which isrepresented in FIG. 2 with a "!" symbol (reference numeral 88) for"false" or 0 in front of the word "Key", and a "" (no symbol) 89 infront of the word "Key" indicating true, or a value of 1. As shown,there are 16 combinations of four different mixing keys 82 when each keycode 62 has two possibilities if each combination has four mixing keys82. Each of these sixteen possible combinations of mixing keys isreferred to as a key code combination 86 referred to above.

The use of key code combinations 86 by themselves to select between aparticular input pixel 22 or 24 in FIG. 1 is well known. In order toprovide much greater flexibility, the present invention programs theselect signal generator 50 to consider (i.e. logically combine) multiplekey code combinations 86 simultaneously. Thus, if the logicalcombination of the selected key code combinations 86 returns a 1 theselect function equals 1 and the appropriate select signal is sentindicating that input pixel from image 1 is to be passed. A return of a0 as the result of the logical combination will cause the selectfunction to equal 0 and select the input pixel from image 2.

In the present invention, the selection of key code combinations 86 thatare logically combined by select function 80 is achieved through the useof a Raster OPeration (ROP) code 90. The ROP code 90 is a programmablevalue stored, for example, in a plurality of single-bit ROP coderegisters 92. Each ROP code register 92 stores a value, for example a 1or 0, and is associated with a different one for the key codecombinations 86. The ROP code register value associated with aparticular key code combination 86 is logically ANDed with that key codecombination 86. A ROP code register value of 1 enables the associatedkey code combination 86.

The enabled key code combination 86, indicated by the associated ROPcode register values, are logically ORed together in exemplaryembodiments of the invention. This allows the key code combinations 86to be logically combined in over 65,000 different ways.

As a first example, assume that the ROP code 90 is set in the ROP coderegisters 92 to enable a single key code combination. Select function 80in this case equals the result of logically ANDing ROP code 92("ROP[11]") with key code combination 86 ("₋₋ Key3 & !Key2 & ₋₋ Key1 &₋₋ Key0"). Thus, if the result of Keys 3, 1, 0 equals 1, and the resultof Key2 equals 0, ANDing these values makes the value of the key codecombination 86 equals to 1. Since in this first example one bit 11 inthe ROP code register 92 has a value of 1, this value ANDed with keycode combination 86 also yields a value of 1. The value of the ORedcombination of key code combinations 86 is therefore equal to 1. Thisvalue of 1 causes the select signal generator 50 to send an appropriateselect signal 38 to inform MUX 20 to pass the input pixel associatedwith the value 1 (e.g. from image 1).

Instead of a single key code combination 86, assume that it is desiredto select an image pixel based on a combination of multiple key codecombinations 86. In that case multiple key code combinations 86 aresimultaneously selected by storing 1's in a plurality of ROP coderegisters, such as 92a, 92b. 92c. Thus, if the value of ANDing ROP code92a with key code combination 86a is 1, OR the value of ANDing ROP code92b with key code combination 86b is 1, OR the value of ANDing ROP code92c with key code combination 86c is 1. then select function 80 willequal 1. When select function 80 equals 1, select signal generator 50sends select signal 38 to MUX 20 the value of 1 which designates, forexample, that input image 24 is to be passed to display screen 30. TheROP code for this example is ROP[15:0]=0000000101001000 in binarynotation or 0148 in hexadecimal notation.

If all bits of ROP[15:0] were set to logic 0, then the select functionwould always be 0, and using the above example, input image 22 would bepassed by MUX 20 to display 30. If all bits of ROP[15:0] were set tologic 1, then input image 24 would always be passed, regardless of theoutcomes from the various mixing keys 82. A particular mixing key isdisregarded (a "don't care") by choosing a pair of key code combinations86 in which the value of the mixing key is 0 in the first key codecombination 86, and 1 in the second key code combination 86.

The use of ROP code 90 determines how select function 80 combines themixing key comparisons to offer much greater programming flexibilityover traditional methods for generating the select function. The methodof the present invention allows for many functions to be consideredsimultaneously in evaluating which pixel to select for display.

For example, traditional methods which combine n mixing keys arenormally limited to 2^(n) combinations. However, by applying ROP codesaccording to the present invention, the number of possibilities forcombining, mixing keys is 2².spsp.n where the number of key codes is nand the number of key code combinations is 2^(n) (if the key codes haveonly two possible outcomes). The ROP codes have a bit length of 2^(n).

Where the number n of mixing keys is 4, for example, the number of keycode combinations is 16 and the total number of combinations is 65,563.The present invention is not limited to four mixing keys, but is alsoapplicable to a greater or lesser number of mixing keys.

FIG. 3 is a diagram of an alternative embodiment where a two-tieredmultiplexer arrangement permits three images to be combined. The firstMUX 20 selects between input images 22 and 24. A second MUX 120 receivesthe output 28 from first MUX 20 (i.e., either the first or second imagedata) and also receives the image data for a third image 122.

The operation of MUX 120 is similar to that described above inconjunction with the embodiment of FIG. 1 that selects between only twoinput image signals. In this instance though, MUX 120 is controlled by adifferent signal 138 which is generated from select signal generator 50in a manner similar to the generation of select signal 38. It shouldalso be noted that signal 28 output from MUX 20 can be used by mixingfunction generator 54 in the creation of key codes 62. For example, oneof the mixing key functions used in generating the select signal 138 maybe based on whether image 1 or image 2 was selected for a pixel in thefirst MUX 20. The configuration of FIG. 3 allows for additionalflexibility even beyond that discussed above in determining how toproperly display a composite image for display on display screen 30.

Although the present invention has been described in terms of specificexemplary embodiments, it will be understood by those skilled in the artthat variations and modifications can be effected in these exemplaryembodiments without departing from the scope and spirit of theinvention.

What is claimed is:
 1. A graphics controller for producing a compositeimage signal formed from a first image signal and a second image signal,the graphics controller comprising:a multiplexer configured forselectively outputting to a display screen one of a first image signaland a second image signal based on a select signal, the first and secondimage signals each comprising information representing a correspondingpixel value for pixels of a display on the display screen; and a selectsignal generator for generating the select signal based on a logicalcombination of key codes and a raster operation (ROP) code, wherein acomposite image is formed from said pixel values selected from the firstand second image signals.
 2. A graphics controller as claimed in claim 1wherein said select signal generator comprises:key code logic forselectively combining said key codes to produce a plurality of key codecombinations; and combinatorial logic that logically ORs said key codecombinations in accordance with one of said ROP codes to generate saidselect signal.
 3. A graphics controller as claimed in claim 1 whereinthe number of key codes is n, the number of key code combinations is2^(n), the ROP codes have a bit length of 2^(n), and the number ofcombinations of key codes and ROP codes is 2².spsp.n.
 4. A graphicscontroller as claimed in claim 1 wherein at least one of said key codesis a result of a comparison between a first key value and a second keyvalue, and said first key value is a first pixel value of said firstimage signal.
 5. A graphics controller as claimed in claim 4 whereinsaid second key value is a second pixel value of said second imagesignal.
 6. A graphics controller as claimed in claim 4 wherein saidsecond key value results from a function to be applied to said firstpixel value.
 7. A graphics controller as claimed in claim 4 wherein saidsecond key value results from a function to be applied to said firstpixel value.
 8. A graphics controller as claimed in claim 4 wherein saidselect signal is a single bit representation.
 9. A graphics controlleras claimed in claim 1, further comprising a second multiplexer thatreceives the output of the first multiplexer at a first input and athird image at a second input, and a select input that receives a secondselect signal, the second select signal being formed as function of acombination of key codes and a ROP code.
 10. A graphics controller asclaimed in claim 9, wherein one of said key codes represents which ofthe first or second images pixel values was selected at the firstmultiplexer for a particular pixel.
 11. A graphics controller as claimedin claim 2, wherein each bit of a ROP code is logically ANDed with anassociated different one of the key code combinations.
 12. A method forforming a composite image on a display screen from image signal data,said method comprising:receiving first and second image signals from aframe buffer; generating a select signal from a select signal generator,comprising: determining a plurality of mixing key values, combining saidmixing key values to form a plurality of mixing key combinations, andlogically combining the mixing key combinations in accordance with araster operation (ROP) code to form a select signal to select betweenthe first and second images; and performing a pixel mixing functionbetween said first and said second image signals based on said selectsignal in forming said composite image to be displayed on said displayscreen.
 13. A method as claimed in claim 12 further comprising storingthe ROP code in a ROP code register.
 14. A method as claimed in claim 12wherein the first and second image signals are received into a firstMUX, and the method further comprises outputting an output signal fromthe first MUX, receiving both a third image signal and the first outputsignal into a second MUX, and performing a further pixel mixing functionbetween this first output signal and the third image signal in formingthe composite image to be displayed on the display screen.
 15. A methodas claimed in claim 12 wherein the combining of the mixing key valuesfurther comprises performing a logical AND operation between the mixingkey values.
 16. A method as claimed in claim 15 wherein the logicallycombining of the mixing key combinations further comprises performing alogical OR operation between the mixing key combinations.
 17. A methodas claimed in claim 16 wherein performing the logical OR operationcomprises performing a logical AND operation between the ROP code andthe mixing key combinations to identify which of the mixing keycombinations is utilized in forming the select signal.